import Mock from 'mockjs'
const Random = Mock.Random

Mock.mock('/api/user', 'get', {
    "code": "200",
    "datas": {
        "name": Random.cname(),
        // 随机地区
        "area": Random.province(),
        "identity": "超级管理员"
    }
})

Mock.mock('/api/table', {
    "code": "200",
    "datas|10": [{
        // 随机生成年月日,生成多个随机的用@
        "id|+1": 0,
        "date": '@date("yyyy-MM-dd")',
        "name": '@cname()',
        "address": '@city(true)'
    }]
})
Mock.mock('/api/options', {
    "code": "200",
    "datas|10": [{
        "value": '@city()',
        "label": '@province()',
        "children|5": [{
            "value": '@city()',
            "label": '@city()'
        }]
    }]


})